check if varible is emyt pyton

36

var1 = ''
var2 = {}
var3 = [1, 2, 3]
var4 = None

print(bool(var1))
print(bool(var2))
print(bool(var3))
print(bool(var4))

Comments

Submit
0 Comments